#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	int a, n;
	scanf("%d %d", &a, &n);
	int sum = 0;
	int y = 0;
	while (n >= 1)
	{
		sum = sum * 10 + a;
		y = y + sum;
		n--;
	}

	printf("%d", y);


	return 0;
}